package controllers

import (
	"fmt"
)

type MainController struct {
	baseController
}

func (c *MainController) Get() {
	c.Data["Website"] = "beego.me"
	c.Data["Email"] = "astaxie@gmail.com"
	c.TplNames = "index.tpl"
}

func (c *MainController)Prepare(){
	c.Ctx.SetCookie("Lang","zh-CN")
	if c.Ctx.GetCookie("onLine")==""{
		c.Ctx.SetCookie("onLine","true")
		c.Data["onLine"]="快去登陆吧！"
	}else{
		c.Data["onLine"]="你已经登陆啦！"
	}
	c.Data["Lang"] = "zh-CN"
	fmt.Printf("起跑我先行！\r\n")
}
func init(){
		fmt.Print("当前文件default.go","\r\n")
}
